<?php
namespace App\Models\Pdf;

use App\Models\Data\ClickLearn;
use Illuminate\Database\Eloquent\Model;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Relations\HasOne;

class PdfImageCoordinate extends Model
{
    use HasDateTimeFormatter;

    protected $fillable = ['pdf_image_id', 'text', 'audio', 'coordinate', 'click_learn_id'];

    protected $attributes = [
        'text' => '',
    ];

    public function click_learn(): HasOne
    {
        return $this->hasOne(ClickLearn::class, 'id', 'click_learn_id');
    }
}
